package Java.com.wang.Work2;

public class Node<T> {

    T data;
    Node<T> next;

    public Node(Node<T> n)
    {
        next=n;
    }

    public Node(T obj, Node<T> n)
    {
        data=obj;
        next=n;
    }

    public T getData()
    {
        return data;
    }

    public Node<T> getNext()
    {
        return next;
    }


    public void setNext(Node<T> n)
    {
        next=n;
    }

}

